package demo.service.impl;

import org.jweb.core.service.impl.CommonServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import demo.entity.RoomVoteEntity;
import demo.service.VoteServiceI;

@Service("voteService")
@Transactional
public class VoteServiceImpl extends CommonServiceImpl implements VoteServiceI{

	@Override
	public boolean voting(String voteId) {
		RoomVoteEntity voteEntity = this.get(RoomVoteEntity.class, voteId);
		voteEntity.setCount(voteEntity.getCount()+1);
		this.updateEntitie(voteEntity);
		return true;
	}

}
